package com.poi.exp.context;

import java.util.HashMap;
import java.util.Map;

import org.springframework.expression.spel.standard.SpelExpressionParser;
import org.springframework.expression.spel.support.StandardEvaluationContext;

import com.poi.exp.domain.SheetModelVO;

/**
 * 上下文
 * 
 * @author wzy
 * @date 2017年7月11日 下午7:54:10
 */
public class PoiExporterContext {
	private SpelExpressionParser spelExpParser;
	public static final StandardEvaluationContext EVAL_CONTEXT = new StandardEvaluationContext();
	private Map<String, Object> rootObjectMap;

	private Map<String, SheetModelVO> sheetModelMap = new HashMap<>();
	/// 解析到行数
	private int analysisRowNum = 0;
	// 解析到列
	private int analysisColumn = 0;
	/// 解析写数据行数
	private int writerRowNum = 0;

	public PoiExporterContext() {
		super();
	}

	public PoiExporterContext(SpelExpressionParser spelExpressionParser, Map<String, Object> rootObjectMap) {
		this.spelExpParser = spelExpressionParser;
		this.rootObjectMap = rootObjectMap;
	}

	public SpelExpressionParser getSpelExpParser() {
		return spelExpParser;
	}

	public Map<String, Object> getRootObjectMap() {
		return rootObjectMap;
	}

	public static StandardEvaluationContext getEvalContext() {
		return EVAL_CONTEXT;
	}

	public void setSpelExpParser(SpelExpressionParser spelExpParser) {
		this.spelExpParser = spelExpParser;
	}

	public void setRootObjectMap(Map<String, Object> rootObjectMap) {
		this.rootObjectMap = rootObjectMap;
	}

	public int getWriterRowNum() {
		return writerRowNum;
	}

	public void setWriterRowNum(int writerRowNum) {
		this.writerRowNum = writerRowNum;
	}

	public int getAnalysisRowNum() {
		return analysisRowNum;
	}

	public void setAnalysisRowNum(int analysisRowNum) {
		this.analysisRowNum = analysisRowNum;
	}

	public int getAnalysisColumn() {
		return analysisColumn;
	}

	public void setAnalysisColumn(int analysisColumn) {
		this.analysisColumn = analysisColumn;
	}

	public Map<String, SheetModelVO> getSheetModelMap() {
		return sheetModelMap;
	}

	public void setSheetModelMap(Map<String, SheetModelVO> sheetModelMap) {
		this.sheetModelMap = sheetModelMap;
	}
	
}
